package com.jojo.bubble.service.impl;

import com.jojo.bubble.entity.Agent;
import com.jojo.bubble.entity.Order;
import com.jojo.bubble.dao.OrderDao;
import com.jojo.bubble.service.OrderService;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import java.util.List;

import javax.annotation.Resource;

/**
 * 订单表(Order)表服务实现类
 *
 * @author jojo
 * @since 2023-08-08 13:43:21
 */
@Service("orderService")
public class OrderServiceImpl implements OrderService {
    @Resource
    private OrderDao orderDao;

    @Override
    public int count(Order record) {
        return this.orderDao.count(record);
    }

    @Override
    public int insert(Order record) {
        return this.orderDao.insert(record);
    }

    @Override
    public int update(Order record) {
        return this.orderDao.update(record);
    }

    @Override
    public Order getInfo(int id) {
        return this.orderDao.queryById(id);
    }

    @Override
    public List<Order> getList(Order record) {
        return this.orderDao.getList(record);
    }

    @Override
    public int delete(int id) {
        return this.orderDao.delete(id);
    }

    @Override
    public int updateStatus(Integer id) {
        return this.orderDao.updateStatus(id);
    }

    @Override
    public Order getInfoByOrderNo(String orderNo) {
        return orderDao.queryByOrderNo(orderNo);
    }

    @Override
    public List<Order> queryAllByLimit(Order order,List<Integer> agentList, Pageable pageable) {
        return this.orderDao.queryAllByLimit(order,agentList,pageable);
    }

}
